package com.googlecode.jstructs.test.unwoven;

import com.googlecode.jstructs.runtime.ValueTypeStack;

/**
 * Shows how the transformed classes should look
 * 
 * @author Daniel Sperry 2010
 */
public final class Vector3_UW {
	// extends ValueType {
	// removed superclass to prevent instrumentation
	public float x;
	public float y;
	public float z;

	public Vector3_UW() {
		//
	}

	// public Vector3(float x, float y, float z) {
	// super();
	// this.x = x;
	// this.y = y;
	// this.z = z;
	// }

	public Vector3_UW(float x, float y, float z) {
		super();
		ValueTypeStack stack = ValueTypeStack.current();
		_constructor(stack, x, y, z);

		this.x = stack.popFloat();
		this.y = stack.popFloat();
		this.z = stack.popFloat();
	}

	public static void _constructor(ValueTypeStack stack, float x, float y,
			float z) {
		stack.pushFloat(z);
		stack.pushFloat(y);
		stack.pushFloat(x);
	}

	public static void _constructor(ValueTypeStack stack) {
		//
		stack.pushFloat(0);
		stack.pushFloat(0);
		stack.pushFloat(0);
	}

	public static boolean _equals_default(ValueTypeStack stack, float r_x,
			float r_y, float r_z, float s_x, float s_y, float s_z) {
		return r_x == s_x && r_y == s_y && r_z == s_z;
	}

	public static boolean _equals(ValueTypeStack stack, float r_x, float r_y,
			float r_z, float s_x, float s_y, float s_z) {
		return _equals_default(stack, r_x, r_y, r_z, s_x, s_y, s_z);
	}

}
